import { postAxios, getAxios, postDownloadAxios } from "@/lib/http";

export const environmentApi = {
  // 获取详情
  getById: data => {
    return postAxios(`/environment/getById/${data}`);
  },
  // 添加环境 @author wuhq
  addEnvironment: data => {
    return postAxios("/environment/add", data);
  },
  // 分页查询环境 @author wuhq
  queryEnvironment: data => {
    return postAxios("/environment/page/query", data);
  },
  // 批量删除环境 @author wuhq
  batchDeleteEnvironment: idList => {
    return postAxios("/environment/deleteByIds", idList);
  },
  // 修改环境  @author wuhq
  updateEnvironment: data => {
    return postAxios("/environment/update", data);
  },
  // 导出全部  @author wuhq
  exportAll: data => {
    return postDownloadAxios("/environment/export/all", data);
  },
  // 批量导出  @author wuhq
  batchExport: idList => {
    return postDownloadAxios("/environment/export/batch", idList);
  }
};
